# Sample Plugin: Template Tag (variable tag)
#

package MT::Plugin::MyPlugin02;

use strict;
use MT;
use MT::Template::Context;
use vars qw($VERSION);
$VERSION = '0.1';

@MT::Plugin::MyPlugin02::ISA = qw(MT::Plugin);

my $plugin = new MT::Plugin::MyPlugin02({
    name => 'Sample Plugin: Welcome',
    version => $VERSION,
    description => 'Sample: Template Tag (variable tag)',
    author_name => 'Plugin author',
    author_link => 'http://www.example.com/about/',
    doc_link => 'http://www.example.com/docs/',
});
MT->add_plugin($plugin);

MT::Template::Context->add_tag(Welcome => \&welcome);
 
sub welcome {
    my $cfg = MT::ConfigMgr->instance;
    MT->set_language($cfg->DefaultLanguage);
    return $plugin->translate('Welcome to Movable Type!');
}

1;
